package com.steellee.leeexcel.abstruct;

import com.steellee.leeexcel.dto.MetaSheetInfo;

import java.util.List;
import java.util.Map;

/**
 * 对象映射场景： 个性化校验需实现此抽象类
 * 通过ownCheckStart方法进行个性化校验
 */
public abstract class PaOwnCheckExtend {
    public Map<String, String> ownCheck(String errMsg, String errIndex, Map<String, Object> dataList
            , List<MetaSheetInfo> metaSheet) {
        long start = System.currentTimeMillis();
        Map<String, String> errInfo = ownCheckStart(errMsg, errIndex, dataList, metaSheet);
        System.out.println("调用抽象方法用时: "+ (System.currentTimeMillis() - start) + "ms");
        return errInfo;
    }

    public abstract Map<String, String> ownCheckStart(String errMsg, String errIndex, Map<String, Object> dataList, List<MetaSheetInfo> metaSheet);
}